#include <stdio.h>
#include <stdlib.h>
#include <cuda.h>
#include <cuda_runtime.h>


int main(){
  int dCount;
  cudaGetDeviceCount( &dCount );
  int device;

for ( device = 0; device < dCount; ++device )
{
  cudaDeviceProp deviceProp;
  cudaGetDeviceProperties( &deviceProp, device );
 
 printf( "%d - name:                    %s \n" ,device ,deviceProp.name );
 printf( "%d - totalGlobalMem:          %d bytes ( %.2f Gbytes) \n" ,device ,deviceProp.totalGlobalMem , deviceProp.totalGlobalMem / (float)( 1024 * 1024 * 1024)  );
 printf( "%d - sharedMemPerBlock:       %d bytes ( %.2f Kbytes) \n" ,device ,deviceProp.sharedMemPerBlock ,deviceProp.sharedMemPerBlock / (float)1024  );
 printf( "%d - regsPerBlock:            %d \n" ,device ,deviceProp.regsPerBlock );
 printf( "%d - warpSize:                %d \n" ,device ,deviceProp.warpSize );
 printf( "%d - memPitch:                %d \n" ,device ,deviceProp.memPitch );
 printf( "%d - maxThreadsPerBlock:      %d \n" ,device ,deviceProp.maxThreadsPerBlock );
 printf( "%d - maxThreadsDim[0]:        %d \n" ,device ,deviceProp.maxThreadsDim[0] );
 printf( "%d - maxThreadsDim[1]:        %d \n" ,device ,deviceProp.maxThreadsDim[1] );
 printf( "%d - maxThreadsDim[2]:        %d \n" ,device ,deviceProp.maxThreadsDim[2] );
 printf( "%d - maxGridSize[0]:          %d \n" ,device ,deviceProp.maxGridSize[0] );
 printf( "%d - maxGridSize[1]:          %d \n" ,device ,deviceProp.maxGridSize[1] );
 printf( "%d - maxGridSize[2]:          %d \n" ,device ,deviceProp.maxGridSize[2] );
 printf( "%d - totalConstMem:           %d bytes ( %.2f Kbytes) \n" ,device ,deviceProp.totalConstMem ,deviceProp.totalConstMem / (float) 1024 );
 printf( "%d - compute capability:      %d.%d \n" ,device ,deviceProp.major ,deviceProp.minor);
 printf( "%d - clockRate                %d kilohertz \n" ,device ,deviceProp.clockRate );
 printf( "%d - textureAlignment         %d \n" ,device ,deviceProp.textureAlignment );
}

return 0;
}

